#include <stdio.h>
void exchange(int *p1, int *p2)
{
    int temp;
    temp = *p1;
    *p1 = *p2;
    *p2 = temp;
    printf("in exchange():\nx1=%d,x2=%d\n", *p1, *p2);
}
int main()
{
    int *ptr_1, *ptr_2, x1 = 10, x2 = 8;
    ptr_1 = &x1, ptr_2 = &x2;
    printf("begin of exchange():\n");
    printf("x1=%d,x2=%d\n", x1, x2);
    exchange(ptr_1, ptr_2);
    printf("begin of exchange():\n");
    printf("integer data:x1=%d,x2=%d\n", x1, x2);
    printf("integer data:x1=%d,x2=%d\n", *ptr_1, *ptr_2);
}